﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SearchWoringReport.aspx.cs" Inherits="pages_WorkingReport_SearchWoringReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>工作查询</title>
    <link href="<%=Page.ResolveUrl("~/") %>css/style.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
    <!--
    body {
	    margin-left: 0px;
	    margin-top: 0px;
	    margin-right: 0px;
	    margin-bottom: 0px;
         SCROLLBAR-FACE-COLOR: #d3e8ed;
         SCROLLBAR-HIGHLIGHT-COLOR: #6c6c90;
         SCROLLBAR-SHADOW-COLOR: #d3e8ed;
         SCROLLBAR-3DLIGHT-COLOR: #d3e8ed;
         SCROLLBAR-ARROW-COLOR: #240084;
         SCROLLBAR-TRACK-COLOR: #d3e8ed;
         SCROLLBAR-DARKSHADOW-COLOR: #4848ac;
         SCROLLBAR-BASE-COLOR: #d3e8ed
    }-->
    </style>
</head>
    <script language="javascript" type="text/javascript" src="<%=Page.ResolveUrl("~/") %>js/common.js"></script>
    <script type="text/javascript">
    //<![CDATA[
    function ShowHidden(sid,ev)
    {
        ev = ev || window.event;
        var target = ev.target || ev.srcElement;
        var oDiv = document.getElementById("div" + sid);
        oDiv.style.display = oDiv.style.display == "none"?"block":"none";
        target.innerHTML = oDiv.style.display == "none"?"显示":"隐藏";
    }
    
    function change(r)
    {
        var divs = document.getElementsByTagName("div");
        for(i=0;i<divs.length;i++)
        {
            if(divs[i].id.indexOf("div")==0)
            {
                divs[i].style.display = r;
            }
        }
        var spans = document.getElementsByTagName("span");
        for(i=0;i<spans.length;i++)
        {
            if(spans[i].onclick != null)
            spans[i].innerHTML = r == "none"?"显示":"隐藏";
        }
    }
  
    function choiceEmp()
    {
        var obj = document.forms[0];
       //通过弹窗口来执行Action
       var paramKQ ="<%=Page.ResolveUrl("~/") %>common/SelectEmp.aspx";
       showModalDialog(paramKQ,window, "dialogWidth:450px;dialogHeight:500px;dialogLeft:380px;dialogTop:225px;center:yes;help:no;status:no;location:no;toolbar:no");
    }
      
    function setEmpValues(nodeID,nodeText)
    {
        //给人员控件赋值。
        document.all["hidEmpCode"].value = nodeID;
        document.all["txtEmpName"].value = nodeText;
    }
  
  //]]>
  </script>
<body>
<form id="form1" runat="server">
    <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
        <tr height="25">
           <td style="background-image: url(<%=Page.ResolveUrl("~/") %>images/lb_14.gif)">
               &nbsp;&nbsp;<asp:Image ID="Image1" runat="server" ImageUrl="~/images/navi-home.gif" ImageAlign="Bottom"/>&nbsp;个人办公
               <asp:Image ID="Image2" runat="server" ImageUrl="~/images/navi-sep.gif" ImageAlign="Bottom"/>&nbsp;工作日志查询
           </td>  
           <td class="top_buttons_td">
               
           </td>  
        </tr>
    </table>        
    <script language="javascript" type="text/javascript" src="../../../js/My97DatePicker/WdatePicker.js"></script>
    
    <br/>
    <div>
    <table cellpadding="0" cellspacing="0" class="search_bar" align="center" width="96%" >
       <tr>
          <td width="250">
                &nbsp;员工姓名:<asp:TextBox ID="txtEmpName" runat="server" onfocus="this.blur();" Width="100px" ></asp:TextBox>
                <input type="button" name="button" value="…" onclick="choiceEmp();" id="Button1"/>
                <asp:HiddenField ID="hidEmpCode" runat="server" />
          </td>    
          <td width="300" align="left">日期:<asp:TextBox ID="txtBeginDate" runat="server" Width="90px"  onfocus="this.blur();"></asp:TextBox>
                                             <img alt="Calendar" src="../../../images/Calendar.gif" onclick="WdatePicker({el:$dp.$('txtBeginDate')})" />
                                           ～<asp:TextBox ID="txtEndDate" runat="server" Width="90px"  onfocus="this.blur();"></asp:TextBox>
                                             <img alt="Calendar" src="../../../images/Calendar.gif" onclick="WdatePicker({el:$dp.$('txtEndDate')})" />
           </td>   
           <td align="left" ><asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" CssClass="button_sky"/></td> 
       </tr>
    </table>
    
    <br/>
    <table border="0" cellpadding="0" cellspacing="0" width="96%">
        <tr>
            <td align="right" nowrap="nowrap">
                <a href="javascript:" onclick="change('block')">全部显示</a>
                &nbsp;&nbsp;
                <a href="javascript:" onclick="change('none')">全部隐藏</a>
            </td>
        </tr>
    </table>
    
    <br />
    <div style="text-align:center">
        <asp:DataList ID="DataList1" Width="96%" runat="server" OnItemDataBound="DataList1_ItemDataBound" Height="20px" BorderColor="DimGray" BorderStyle="Solid" BorderWidth="1px" Caption="工作日志列表" BackColor="#F8F8F8" Font-Bold="False" Font-Size="9pt" ForeColor="Black" ShowFooter="False" GridLines="Both">
            <HeaderTemplate>
                  <asp:Label ID="Label1" runat="server" Text="姓名" Width="8%" Font-Bold="true"></asp:Label>
                  <asp:Label ID="Label2" runat="server" Text="日期" Width="8%" Font-Bold="true"></asp:Label>
                  <asp:Label ID="Label3" runat="server" Text="星期" Width="8%" Font-Bold="true"></asp:Label>
                  <asp:Label ID="Label4" runat="server" Text="上班" Width="8%" Font-Bold="true"></asp:Label>
                  <asp:Label ID="Label5" runat="server" Text="下班" Width="8%" Font-Bold="true"></asp:Label>
                  <asp:Label ID="Label6" runat="server" Text="时长" Width="8%" Font-Bold="true"></asp:Label>
                  <asp:Label ID="Label9" runat="server" Text="知识积累" Width="21%" Font-Bold="true"></asp:Label>
                  <asp:Label ID="Label7" runat="server" Text="备注" Width="21%" Font-Bold="true"></asp:Label>                  
                  <asp:Label ID="Label8" runat="server" Text="操作" Width="4%" Font-Bold="true"></asp:Label>
            </HeaderTemplate>
  
            <ItemTemplate>
                
                <asp:Label ID="makeMiddle"  runat="server" Text=' ' Width="1%" Height="20px"></asp:Label>
                <asp:Label ID="emp_name"  runat="server" Text='<%# Eval("emp_name") %>' Width="8%" ></asp:Label>
                <asp:Label ID="reg_date" runat="server" Text='<%# Eval("reg_date") %>' Width="8%"></asp:Label>
                <asp:Label ID="reg_weekday" runat="server" Text='<%# Eval("reg_weekday") %>' CssClass="div_center" Width="8%"></asp:Label>
                <asp:Label ID="start_time" runat="server" Text='<%# Eval("reg_on_datetime") %>' CssClass="div_center" Width="8%"></asp:Label>
                <asp:Label ID="end_time" runat="server" Text='<%# Eval("reg_off_datetime") %>' CssClass="div_center" Width="8%"></asp:Label>
                <asp:Label ID="work_time" runat="server" Text='<%# Eval("work_time") %>' CssClass="div_center" Width="8%"></asp:Label>
                <asp:Label ID="today_knowledge" runat="server" Text='<%# Eval("today_knowledge") %>' Width="21%"></asp:Label>
                <asp:Label ID="working_memo" runat="server" Text='<%# Eval("working_memo") %>' Width="21%"></asp:Label>
                <span style="float: right;color: Red; cursor: pointer;height:20px;" onclick="ShowHidden('<%#Eval("pk_id") %>',event)">显示</span>
                <asp:HiddenField ID="id" runat="server" Value='<%# Eval("pk_id") %>'/>
                
               <div style="text-align:right;padding-left: 5px; display: none;" id="div<%#Eval("pk_id") %>">
                    <asp:GridView HorizontalAlign="Right" ID="GridView1" BorderColor="#999999" BorderStyle="none" BorderWidth="0" runat="server" Width="91%" Height="20px" AutoGenerateColumns="False" ShowHeader="False">
                        <Columns>
                            <asp:BoundField DataField="start_time" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="12%" ItemStyle-ForeColor="#606060" />
                            <asp:BoundField DataField="end_time"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" ItemStyle-ForeColor="#606060"/>
                            <asp:BoundField DataField="working_type_name"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="19%" ItemStyle-ForeColor="#606060"/>
                            <asp:BoundField DataField="work_time" DataFormatString="{0:F1}" HtmlEncode="false"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="11%" ItemStyle-ForeColor="#606060"/>
                            <asp:BoundField DataField="work_description"  ItemStyle-HorizontalAlign="Left" ItemStyle-ForeColor="#606060"/>
                        </Columns>
                    <RowStyle Height="20px" />
                    </asp:GridView>
               </div>   
                
            </ItemTemplate>  
            <ItemStyle BorderStyle="Solid" BorderWidth="1px" BackColor="#EEEEEE" BorderColor="#006699" HorizontalAlign="Left" VerticalAlign="Middle" Height="20px" />
            <HeaderStyle BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Center" ForeColor="Black" Height="20px" CssClass="table_title" />

       
        </asp:DataList>
        </div>
        </div>
    </form>
</body>
</html>
